using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;


namespace Arroguella.Panels
{
    /// <summary>
    /// Defines a portion of a screen that handles its own updating and drawing.
    /// </summary>
    public class ScreenPanel : GameComponent
    {
        #region Constructor

        protected ScreenPanel(Game game)
            : base(game)
        {
            Arroguella = game as Arroguella;
        }

        #endregion

        #region Events
        #endregion

        #region Methods

        /// <summary>
        /// Allows the game component to perform any initialization it needs to before starting
        /// to run.  This is where it can query for any required services and load content.
        /// </summary>
        public override void Initialize()
        {
            base.Initialize();
        }

        /// <summary>
        /// Allows the game component to update itself.
        /// </summary>
        /// <param name="gameTime">Provides a snapshot of timing values.</param>
        public override void Update(GameTime gameTime)
        {
            base.Update(gameTime);
        }

        /// <summary>
        /// Allows the game component to draw itself
        /// </summary>
        public virtual void Draw(SpriteBatch spriteBatch)
        {

        }

        /// <summary>
        /// Sets the size, shape, and location of the MessagePanel.
        /// </summary>
        public void SetSizeAndShape(int x, int y, int width, int height)
        {
            SizeAndShape = new Rectangle(x, y, width, height);
        }

        #endregion

        #region Properties

        /// <summary>
        /// A reference to the main game.
        /// </summary>
        internal Arroguella Arroguella;

        internal SpriteFont Font { get { return Arroguella.Font; } }

        internal SpriteFont PlayerInfoFont { get { return Arroguella.PlayerInfoFont; } }

        private GraphicsDevice GraphicsDevice { get { return Arroguella.GraphicsDevice; } }

        internal Rectangle SizeAndShape { get; private set; }

        public Color BackgroundColor { get; set; }

        #endregion
    }
}
